﻿namespace HRM.CORE.Option
{
    using DevExpress.Utils;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Mask;
    using APP.HELPER;
    using HRM.CORE.CLASS;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms; using Common;
    using Common;

    public class xucDocumentNumberOption : Common.xucBase
    {
        private CalcEdit calLengthCadidateCode;
        private CalcEdit calLengthContractCode;
        private CalcEdit calLengthEmployeeCode;
        private IContainer components = null;
        private FontDialog fontDialog1;
        private GroupBox groupBox1;
        private GroupBox groupBox2;
        private GroupBox groupBox3;
        private GroupBox groupBox4;
        private GroupBox groupBox5;
        private GroupBox groupBox6;
        private GroupBox groupBox7;
        private GroupBox groupBox8;
        private LabelControl labelControl1;
        private LabelControl labelControl2;
        private LabelControl labelControl3;
        private LabelControl labelControl4;
        private LabelControl labelControl5;
        private LabelControl labelControl6;
        private LabelControl labelControl7;
        private LabelControl labelControl8;
        private LabelControl labelControl9;
        private LabelControl lbPreviewCandidateCode;
        private LabelControl lbPreviewContractCode;
        private LabelControl lbPreviewEmployeeCode;
        private TextEdit txtPrefixCandidateCode;
        private TextEdit txtPrefixContractCode;
        private TextEdit txtPrefixEmployeeCode;
        private TextEdit txtSuffixCandidateCode;
        private TextEdit txtSuffixContractCode;
        private TextEdit txtSuffixEmployeeCode;
        private XtraScrollableControl xtraScrollableControl1;

        public xucDocumentNumberOption()
        {
            this.InitializeComponent();
            this.LoadOption();
        }

        private void calLengthCadidateCode_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                if (int.Parse(this.calLengthCadidateCode.EditValue.ToString()) < 2)
                {
                    this.calLengthCadidateCode.EditValue = 2;
                }
                else if (int.Parse(this.calLengthCadidateCode.EditValue.ToString()) > 8)
                {
                    this.calLengthCadidateCode.EditValue = 8;
                }
                else if ((int.Parse(this.calLengthCadidateCode.EditValue.ToString()) >= 2) && (int.Parse(this.calLengthCadidateCode.EditValue.ToString()) <= 8))
                {
                    string str = "0";
                    while (str.Length < int.Parse(this.calLengthCadidateCode.Text))
                    {
                        str = str + "0";
                    }
                    this.lbPreviewCandidateCode.Text = this.txtPrefixCandidateCode.Text + str + this.txtSuffixCandidateCode.Text;
                }
            }
            catch
            {
            }
        }

        private void calLengthContractCode_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                if (int.Parse(this.calLengthContractCode.EditValue.ToString()) < 2)
                {
                    this.calLengthContractCode.Text = "2";
                }
                else if (int.Parse(this.calLengthContractCode.EditValue.ToString()) > 8)
                {
                    this.calLengthContractCode.Text = "8";
                }
                else
                {
                    string str = "0";
                    while (str.Length < int.Parse(this.calLengthContractCode.Text))
                    {
                        str = str + "0";
                    }
                    this.lbPreviewContractCode.Text = this.txtPrefixContractCode.Text + str + this.txtSuffixContractCode.Text;
                }
            }
            catch
            {
            }
        }

        private void calLengthEmployeeCode_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                if (int.Parse(this.calLengthEmployeeCode.EditValue.ToString()) < 2)
                {
                    this.calLengthEmployeeCode.Text = "2";
                }
                else if (int.Parse(this.calLengthEmployeeCode.EditValue.ToString()) > 8)
                {
                    this.calLengthEmployeeCode.Text = "8";
                }
                else
                {
                    string str = "0";
                    while (str.Length < int.Parse(this.calLengthEmployeeCode.Text))
                    {
                        str = str + "0";
                    }
                    this.lbPreviewEmployeeCode.Text = this.txtPrefixEmployeeCode.Text + str + this.txtSuffixEmployeeCode.Text;
                }
            }
            catch
            {
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucDocumentNumberOption));
            this.fontDialog1 = new FontDialog();
            this.xtraScrollableControl1 = new XtraScrollableControl();
            this.labelControl9 = new LabelControl();
            this.labelControl7 = new LabelControl();
            this.labelControl2 = new LabelControl();
            this.labelControl3 = new LabelControl();
            this.labelControl1 = new LabelControl();
            this.groupBox1 = new GroupBox();
            this.labelControl4 = new LabelControl();
            this.groupBox4 = new GroupBox();
            this.labelControl5 = new LabelControl();
            this.calLengthCadidateCode = new CalcEdit();
            this.txtSuffixCandidateCode = new TextEdit();
            this.txtPrefixCandidateCode = new TextEdit();
            this.lbPreviewCandidateCode = new LabelControl();
            this.groupBox8 = new GroupBox();
            this.txtSuffixContractCode = new TextEdit();
            this.calLengthContractCode = new CalcEdit();
            this.labelControl8 = new LabelControl();
            this.txtPrefixContractCode = new TextEdit();
            this.lbPreviewContractCode = new LabelControl();
            this.groupBox2 = new GroupBox();
            this.txtSuffixEmployeeCode = new TextEdit();
            this.calLengthEmployeeCode = new CalcEdit();
            this.labelControl6 = new LabelControl();
            this.txtPrefixEmployeeCode = new TextEdit();
            this.lbPreviewEmployeeCode = new LabelControl();
            this.groupBox7 = new GroupBox();
            this.groupBox6 = new GroupBox();
            this.groupBox5 = new GroupBox();
            this.groupBox3 = new GroupBox();
            this.xtraScrollableControl1.SuspendLayout();
            this.groupBox4.SuspendLayout();
            this.calLengthCadidateCode.Properties.BeginInit();
            this.txtSuffixCandidateCode.Properties.BeginInit();
            this.txtPrefixCandidateCode.Properties.BeginInit();
            this.groupBox8.SuspendLayout();
            this.txtSuffixContractCode.Properties.BeginInit();
            this.calLengthContractCode.Properties.BeginInit();
            this.txtPrefixContractCode.Properties.BeginInit();
            this.groupBox2.SuspendLayout();
            this.txtSuffixEmployeeCode.Properties.BeginInit();
            this.calLengthEmployeeCode.Properties.BeginInit();
            this.txtPrefixEmployeeCode.Properties.BeginInit();
            base.SuspendLayout();
            this.xtraScrollableControl1.Controls.Add(this.labelControl9);
            this.xtraScrollableControl1.Controls.Add(this.labelControl7);
            this.xtraScrollableControl1.Controls.Add(this.labelControl2);
            this.xtraScrollableControl1.Controls.Add(this.labelControl3);
            this.xtraScrollableControl1.Controls.Add(this.labelControl1);
            this.xtraScrollableControl1.Controls.Add(this.groupBox1);
            this.xtraScrollableControl1.Controls.Add(this.labelControl4);
            this.xtraScrollableControl1.Controls.Add(this.groupBox4);
            this.xtraScrollableControl1.Controls.Add(this.groupBox8);
            this.xtraScrollableControl1.Controls.Add(this.groupBox2);
            this.xtraScrollableControl1.Controls.Add(this.groupBox7);
            this.xtraScrollableControl1.Controls.Add(this.groupBox6);
            this.xtraScrollableControl1.Controls.Add(this.groupBox5);
            this.xtraScrollableControl1.Controls.Add(this.groupBox3);
            this.xtraScrollableControl1.Dock = DockStyle.Fill;
            this.xtraScrollableControl1.Location = new Point(0, 0);
            this.xtraScrollableControl1.Name = "xtraScrollableControl1";
            this.xtraScrollableControl1.Size = new Size(0x204, 0x195);
            this.xtraScrollableControl1.TabIndex = 4;
            this.labelControl9.AllowHtmlString = true;
            this.labelControl9.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl9.Location = new Point(0x15, 0x10d);
            this.labelControl9.Name = "labelControl9";
            this.labelControl9.Size = new Size(0x1d7, 0x24);
            this.labelControl9.TabIndex = 0x10;
            this.labelControl9.Text = "Ngo\x00e0i c\x00e1c bảng dữ liệu ở tr\x00ean th\x00ec c\x00e1c bảng c\x00f2n lại sẽ c\x00f3 tiếp đầu ngữ theo mặc định m\x00e0 chương tr\x00ecnh c\x00e0i đặt sẳn.";
            this.labelControl7.AllowHtmlString = true;
            this.labelControl7.AutoSizeMode = LabelAutoSizeMode.None;
            this.labelControl7.Location = new Point(0x15, 0x2e);
            this.labelControl7.Name = "labelControl7";
            this.labelControl7.Size = new Size(0x1d7, 0x31);
            this.labelControl7.TabIndex = 0x10;
            this.labelControl7.Text = manager.GetString("labelControl7.Text");
            this.labelControl2.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl2.Appearance.ForeColor = Color.Black;
            this.labelControl2.Appearance.Options.UseFont = true;
            this.labelControl2.Appearance.Options.UseForeColor = true;
            this.labelControl2.Location = new Point(0xc3, 0x77);
            this.labelControl2.Name = "labelControl2";
            this.labelControl2.Size = new Size(0x43, 13);
            this.labelControl2.TabIndex = 1;
            this.labelControl2.Text = "Chiều d\x00e0i số";
            this.labelControl3.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl3.Appearance.ForeColor = Color.Black;
            this.labelControl3.Appearance.Options.UseFont = true;
            this.labelControl3.Appearance.Options.UseForeColor = true;
            this.labelControl3.Location = new Point(0x11e, 0x77);
            this.labelControl3.Name = "labelControl3";
            this.labelControl3.Size = new Size(0x25, 13);
            this.labelControl3.TabIndex = 2;
            this.labelControl3.Text = "Hậu tố";
            this.labelControl1.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl1.Appearance.ForeColor = Color.Black;
            this.labelControl1.Appearance.Options.UseFont = true;
            this.labelControl1.Appearance.Options.UseForeColor = true;
            this.labelControl1.Location = new Point(0x85, 0x77);
            this.labelControl1.Name = "labelControl1";
            this.labelControl1.Size = new Size(0x27, 13);
            this.labelControl1.TabIndex = 0;
            this.labelControl1.Text = "Tiền tố";
            this.groupBox1.Font = new Font("Tahoma", 9.75f, FontStyle.Bold);
            this.groupBox1.ForeColor = Color.Blue;
            this.groupBox1.Location = new Point(0x15, 0x10);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new Size(0x1d8, 0x12);
            this.groupBox1.TabIndex = 10;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Số tăng tự động khi th\x00eam mới dữ liệu";
            this.labelControl4.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl4.Appearance.ForeColor = Color.Black;
            this.labelControl4.Appearance.Options.UseFont = true;
            this.labelControl4.Appearance.Options.UseForeColor = true;
            this.labelControl4.Location = new Point(0x182, 0x77);
            this.labelControl4.Name = "labelControl4";
            this.labelControl4.Size = new Size(0x3b, 13);
            this.labelControl4.TabIndex = 3;
            this.labelControl4.Text = "Xem trước";
            this.groupBox4.Controls.Add(this.labelControl5);
            this.groupBox4.Controls.Add(this.calLengthCadidateCode);
            this.groupBox4.Controls.Add(this.txtSuffixCandidateCode);
            this.groupBox4.Controls.Add(this.txtPrefixCandidateCode);
            this.groupBox4.Controls.Add(this.lbPreviewCandidateCode);
            this.groupBox4.Location = new Point(20, 0x87);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new Size(0x1d8, 0x29);
            this.groupBox4.TabIndex = 13;
            this.groupBox4.TabStop = false;
            this.labelControl5.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl5.Appearance.ForeColor = Color.Black;
            this.labelControl5.Appearance.Options.UseFont = true;
            this.labelControl5.Appearance.Options.UseForeColor = true;
            this.labelControl5.Location = new Point(0x11, 0x10);
            this.labelControl5.Name = "labelControl5";
            this.labelControl5.Size = new Size(0x45, 13);
            this.labelControl5.TabIndex = 6;
            this.labelControl5.Text = "M\x00e3 ứng vi\x00ean";
            this.calLengthCadidateCode.Location = new Point(180, 14);
            this.calLengthCadidateCode.Name = "calLengthCadidateCode";
            this.calLengthCadidateCode.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calLengthCadidateCode.Properties.Mask.MaskType = MaskType.None;
            this.calLengthCadidateCode.Size = new Size(0x38, 20);
            this.calLengthCadidateCode.TabIndex = 5;
            this.calLengthCadidateCode.TabStop = false;
            this.calLengthCadidateCode.EditValueChanged += new EventHandler(this.calLengthCadidateCode_EditValueChanged);
            this.txtSuffixCandidateCode.Location = new Point(0x101, 14);
            this.txtSuffixCandidateCode.Name = "txtSuffixCandidateCode";
            this.txtSuffixCandidateCode.Properties.Appearance.Options.UseTextOptions = true;
            this.txtSuffixCandidateCode.Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
            this.txtSuffixCandidateCode.Size = new Size(0x38, 20);
            this.txtSuffixCandidateCode.TabIndex = 4;
            this.txtSuffixCandidateCode.EditValueChanged += new EventHandler(this.calLengthCadidateCode_EditValueChanged);
            this.txtPrefixCandidateCode.Location = new Point(0x69, 14);
            this.txtPrefixCandidateCode.Name = "txtPrefixCandidateCode";
            this.txtPrefixCandidateCode.Properties.Appearance.Options.UseTextOptions = true;
            this.txtPrefixCandidateCode.Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
            this.txtPrefixCandidateCode.Size = new Size(0x38, 20);
            this.txtPrefixCandidateCode.TabIndex = 4;
            this.txtPrefixCandidateCode.EditValueChanged += new EventHandler(this.calLengthCadidateCode_EditValueChanged);
            this.lbPreviewCandidateCode.Appearance.Font = new Font("Tahoma", 10f);
            this.lbPreviewCandidateCode.Appearance.Options.UseFont = true;
            this.lbPreviewCandidateCode.Appearance.Options.UseTextOptions = true;
            this.lbPreviewCandidateCode.Appearance.TextOptions.Trimming = Trimming.EllipsisCharacter;
            this.lbPreviewCandidateCode.Appearance.TextOptions.WordWrap = WordWrap.NoWrap;
            this.lbPreviewCandidateCode.AutoSizeMode = LabelAutoSizeMode.None;
            this.lbPreviewCandidateCode.Location = new Point(0x158, 14);
            this.lbPreviewCandidateCode.Name = "lbPreviewCandidateCode";
            this.lbPreviewCandidateCode.Size = new Size(0x6d, 0x10);
            this.lbPreviewCandidateCode.TabIndex = 8;
            this.lbPreviewCandidateCode.Text = "  ";
            this.groupBox8.Controls.Add(this.txtSuffixContractCode);
            this.groupBox8.Controls.Add(this.calLengthContractCode);
            this.groupBox8.Controls.Add(this.labelControl8);
            this.groupBox8.Controls.Add(this.txtPrefixContractCode);
            this.groupBox8.Controls.Add(this.lbPreviewContractCode);
            this.groupBox8.Location = new Point(20, 0xda);
            this.groupBox8.Name = "groupBox8";
            this.groupBox8.Size = new Size(0x1d8, 0x29);
            this.groupBox8.TabIndex = 14;
            this.groupBox8.TabStop = false;
            this.txtSuffixContractCode.Location = new Point(0x101, 14);
            this.txtSuffixContractCode.Name = "txtSuffixContractCode";
            this.txtSuffixContractCode.Properties.Appearance.Options.UseTextOptions = true;
            this.txtSuffixContractCode.Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
            this.txtSuffixContractCode.Size = new Size(0x38, 20);
            this.txtSuffixContractCode.TabIndex = 4;
            this.txtSuffixContractCode.EditValueChanged += new EventHandler(this.calLengthContractCode_EditValueChanged);
            this.calLengthContractCode.Location = new Point(180, 14);
            this.calLengthContractCode.Name = "calLengthContractCode";
            this.calLengthContractCode.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calLengthContractCode.Properties.Mask.MaskType = MaskType.None;
            this.calLengthContractCode.Size = new Size(0x38, 20);
            this.calLengthContractCode.TabIndex = 5;
            this.calLengthContractCode.TabStop = false;
            this.calLengthContractCode.EditValueChanged += new EventHandler(this.calLengthContractCode_EditValueChanged);
            this.labelControl8.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl8.Appearance.ForeColor = Color.Black;
            this.labelControl8.Appearance.Options.UseFont = true;
            this.labelControl8.Appearance.Options.UseForeColor = true;
            this.labelControl8.Location = new Point(0x11, 0x11);
            this.labelControl8.Name = "labelControl8";
            this.labelControl8.Size = new Size(0x47, 13);
            this.labelControl8.TabIndex = 7;
            this.labelControl8.Text = "Hợp đồng LĐ";
            this.txtPrefixContractCode.Location = new Point(0x69, 14);
            this.txtPrefixContractCode.Name = "txtPrefixContractCode";
            this.txtPrefixContractCode.Properties.Appearance.Options.UseTextOptions = true;
            this.txtPrefixContractCode.Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
            this.txtPrefixContractCode.Size = new Size(0x38, 20);
            this.txtPrefixContractCode.TabIndex = 4;
            this.txtPrefixContractCode.EditValueChanged += new EventHandler(this.calLengthContractCode_EditValueChanged);
            this.lbPreviewContractCode.Appearance.Font = new Font("Tahoma", 10f);
            this.lbPreviewContractCode.Appearance.Options.UseFont = true;
            this.lbPreviewContractCode.Appearance.Options.UseTextOptions = true;
            this.lbPreviewContractCode.Appearance.TextOptions.Trimming = Trimming.EllipsisCharacter;
            this.lbPreviewContractCode.Appearance.TextOptions.WordWrap = WordWrap.NoWrap;
            this.lbPreviewContractCode.AutoSizeMode = LabelAutoSizeMode.None;
            this.lbPreviewContractCode.Location = new Point(0x158, 15);
            this.lbPreviewContractCode.Name = "lbPreviewContractCode";
            this.lbPreviewContractCode.Size = new Size(0x6d, 0x10);
            this.lbPreviewContractCode.TabIndex = 8;
            this.lbPreviewContractCode.Text = "  ";
            this.groupBox2.Controls.Add(this.txtSuffixEmployeeCode);
            this.groupBox2.Controls.Add(this.calLengthEmployeeCode);
            this.groupBox2.Controls.Add(this.labelControl6);
            this.groupBox2.Controls.Add(this.txtPrefixEmployeeCode);
            this.groupBox2.Controls.Add(this.lbPreviewEmployeeCode);
            this.groupBox2.Location = new Point(20, 0xb1);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new Size(0x1d8, 0x29);
            this.groupBox2.TabIndex = 14;
            this.groupBox2.TabStop = false;
            this.txtSuffixEmployeeCode.Location = new Point(0x101, 14);
            this.txtSuffixEmployeeCode.Name = "txtSuffixEmployeeCode";
            this.txtSuffixEmployeeCode.Properties.Appearance.Options.UseTextOptions = true;
            this.txtSuffixEmployeeCode.Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
            this.txtSuffixEmployeeCode.Size = new Size(0x38, 20);
            this.txtSuffixEmployeeCode.TabIndex = 4;
            this.txtSuffixEmployeeCode.EditValueChanged += new EventHandler(this.calLengthEmployeeCode_EditValueChanged);
            this.calLengthEmployeeCode.Location = new Point(180, 14);
            this.calLengthEmployeeCode.Name = "calLengthEmployeeCode";
            this.calLengthEmployeeCode.Properties.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.calLengthEmployeeCode.Properties.Mask.MaskType = MaskType.None;
            this.calLengthEmployeeCode.Size = new Size(0x38, 20);
            this.calLengthEmployeeCode.TabIndex = 5;
            this.calLengthEmployeeCode.TabStop = false;
            this.calLengthEmployeeCode.EditValueChanged += new EventHandler(this.calLengthEmployeeCode_EditValueChanged);
            this.labelControl6.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.labelControl6.Appearance.ForeColor = Color.Black;
            this.labelControl6.Appearance.Options.UseFont = true;
            this.labelControl6.Appearance.Options.UseForeColor = true;
            this.labelControl6.Location = new Point(0x11, 0x11);
            this.labelControl6.Name = "labelControl6";
            this.labelControl6.Size = new Size(0x4b, 13);
            this.labelControl6.TabIndex = 7;
            this.labelControl6.Text = "M\x00e3 nh\x00e2n vi\x00ean";
            this.txtPrefixEmployeeCode.Location = new Point(0x69, 14);
            this.txtPrefixEmployeeCode.Name = "txtPrefixEmployeeCode";
            this.txtPrefixEmployeeCode.Properties.Appearance.Options.UseTextOptions = true;
            this.txtPrefixEmployeeCode.Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
            this.txtPrefixEmployeeCode.Size = new Size(0x38, 20);
            this.txtPrefixEmployeeCode.TabIndex = 4;
            this.txtPrefixEmployeeCode.EditValueChanged += new EventHandler(this.calLengthEmployeeCode_EditValueChanged);
            this.lbPreviewEmployeeCode.Appearance.Font = new Font("Tahoma", 10f);
            this.lbPreviewEmployeeCode.Appearance.Options.UseFont = true;
            this.lbPreviewEmployeeCode.Appearance.Options.UseTextOptions = true;
            this.lbPreviewEmployeeCode.Appearance.TextOptions.Trimming = Trimming.EllipsisCharacter;
            this.lbPreviewEmployeeCode.Appearance.TextOptions.WordWrap = WordWrap.NoWrap;
            this.lbPreviewEmployeeCode.AutoSizeMode = LabelAutoSizeMode.None;
            this.lbPreviewEmployeeCode.Location = new Point(0x158, 15);
            this.lbPreviewEmployeeCode.Name = "lbPreviewEmployeeCode";
            this.lbPreviewEmployeeCode.Size = new Size(0x6d, 0x10);
            this.lbPreviewEmployeeCode.TabIndex = 8;
            this.lbPreviewEmployeeCode.Text = "  ";
            this.groupBox7.Location = new Point(0x152, 0x65);
            this.groupBox7.Name = "groupBox7";
            this.groupBox7.Size = new Size(0x9a, 0x9e);
            this.groupBox7.TabIndex = 15;
            this.groupBox7.TabStop = false;
            this.groupBox6.Location = new Point(270, 0x65);
            this.groupBox6.Name = "groupBox6";
            this.groupBox6.Size = new Size(0x45, 0x9e);
            this.groupBox6.TabIndex = 15;
            this.groupBox6.TabStop = false;
            this.groupBox5.Location = new Point(0xbb, 0x65);
            this.groupBox5.Name = "groupBox5";
            this.groupBox5.Size = new Size(0x54, 0x9e);
            this.groupBox5.TabIndex = 15;
            this.groupBox5.TabStop = false;
            this.groupBox3.Location = new Point(120, 0x65);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new Size(0x45, 0x9e);
            this.groupBox3.TabIndex = 15;
            this.groupBox3.TabStop = false;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.xtraScrollableControl1);
            base.Name = "xucDocumentNumberOption";
            base.Size = new Size(0x204, 0x195);
            this.xtraScrollableControl1.ResumeLayout(false);
            this.xtraScrollableControl1.PerformLayout();
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            this.calLengthCadidateCode.Properties.EndInit();
            this.txtSuffixCandidateCode.Properties.EndInit();
            this.txtPrefixCandidateCode.Properties.EndInit();
            this.groupBox8.ResumeLayout(false);
            this.groupBox8.PerformLayout();
            this.txtSuffixContractCode.Properties.EndInit();
            this.calLengthContractCode.Properties.EndInit();
            this.txtPrefixContractCode.Properties.EndInit();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.txtSuffixEmployeeCode.Properties.EndInit();
            this.calLengthEmployeeCode.Properties.EndInit();
            this.txtPrefixEmployeeCode.Properties.EndInit();
            base.ResumeLayout(false);
        }

        private void LoadOption()
        {
            clsDocumentNumberOption option = new clsDocumentNumberOption("CandidateCode", "UV", "");
            clsDocumentNumberOption option2 = new clsDocumentNumberOption("EmployeeCode", "NV", "");
            clsDocumentNumberOption option3 = new clsDocumentNumberOption("ContractCode", "HDLD/", "/" + DateTime.Now.Year);
            this.txtPrefixCandidateCode.Text = option.Prefix;
            this.calLengthCadidateCode.EditValue = option.Length;
            this.txtSuffixCandidateCode.Text = option.Suffix;
            this.txtPrefixEmployeeCode.Text = option2.Prefix;
            this.calLengthEmployeeCode.EditValue = option2.Length;
            this.txtSuffixEmployeeCode.Text = option2.Suffix;
            this.txtPrefixContractCode.Text = option3.Prefix;
            this.calLengthContractCode.EditValue = option3.Length;
            this.txtSuffixContractCode.Text = option3.Suffix;
        }

        public void Save()
        {
            DataTable table = new DataTable();
            DataColumn column = new DataColumn("Prefix");
            DataColumn column2 = new DataColumn("Length");
            DataColumn column3 = new DataColumn("Suffix");
            table.Columns.Add(column);
            table.Columns.Add(column2);
            table.Columns.Add(column3);
            table.Rows.Add(new object[] { this.txtPrefixCandidateCode.Text, this.calLengthCadidateCode.Text, this.txtSuffixCandidateCode.Text });
            table.Rows.Add(new object[] { this.txtPrefixEmployeeCode.Text, this.calLengthEmployeeCode.Text, this.txtSuffixEmployeeCode.Text });
            table.Rows.Add(new object[] { this.txtPrefixContractCode.Text, this.calLengthContractCode.Text, this.txtSuffixContractCode.Text });
            clsDocumentNumberOption.SaveOption(table);
        }
    }
}

